<?php defined('IN_LK') or die('Access Denied');?>
<?php include self::admin_t('header');?>

<ul class="main_nav">
  <li><a href="?m=admin&c=develop_log&ac=1" target="_self" <?php echo $ac == 1 ? 'class="select"' : '';?>>查看日志</a></li>
  <li><a href="?m=admin&c=develop_log&ac=2" target="_self" <?php echo $ac == 2 ? 'class="select"' : '';?>>添加日志</a></li>
</ul>
<div class="c"></div>
<?php if(1 == $ac){?>
<div class="table-list">
  <table width="100%" cellspacing="0">
    <thead>
      <tr>
        <th width="50">序号</th>
        <th width="10%">开发人</th>
        <th width="">更改内容</th>
        <th align="left" width="80">版本号</th>
        <th width="180">时间</th>
        <th align="left" width="80">类型</th>
      </tr>
    </thead>
    <tbody>
      <?php if(isset($logs)){foreach($logs as $log){?>
      <tr>
        <td align="center"><?php echo $log['did'];?></td>
        <td align="center"><?php echo $log['developer'];?></td>
        <td><?php echo $log['change_log'];?></td>
        <td><?php echo $log['version'];?></td>
        <td align="center"><?php echo $log['time'];?></td>
        <td><?php echo $log['change_type'];?></td>
      </tr>
      <?php }}else{?>
      <tr>
        <td colspan="6" align="center">暂无数据</td>
      </tr>
      <?php }?>
    </tbody>
  </table>
  <?php echo $page_nav;?>
</div>
<?php }else{?>
<dl class="form_list">
  <form action="?m=admin&c=develop_log&a=add_log" method="post" id="myform">
    <dd><span class="left w8">开发人</span><span class="green">yangzhiguo</span></dd>
    <dd><span class="left w8">类型</span>
      <select name="info[change_type]">
        <option value="新功能">新功能</option>
        <option value="bug修复">bug修复</option>
        <option value="优化">优化</option>
      </select>
    </dd>
    <dd><span class="left w8">更改内容</span> <span><?php echo form::editor('info[change_log]');?></span> </dd>
    <dd>
      <input type="submit" class="btn" name="dosubmit" id="dosubmit" value="提交" onclick="return check_log()" />
      <input type="reset" class="btn" value="重置" />
    </dd>
  </form>
</dl>
<?php }?>
<?php include self::admin_t('footer');?>
<script type="text/javascript">
function check_log()
{
	if(KE.isEmpty('change_log'))
	{
		window.top.art.dialog(
		{
			id:'checklog',
			title: '提示',
			content:'更改的内容不能为空',
			fixed:true,
			time:2
		},
		function(){});
		return false;
	}
	return true;
}
</script>